package com.itheima.wemedia.controller;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.pojo.WmUser;
import com.itheima.wemedia.service.WmUserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/login")
@Api("登录管理")
public class LoginController {

    @Autowired
    private WmUserService wmUserService;
    @PostMapping("/in")
    public ResultVo<WmUser> loginCheck(@RequestBody Map<String,String> map){
        Map<String, Object> loginMap = wmUserService.loginCheck(map);
        return ResultVo.ok(loginMap);
    }
}
